<?php

class Team_model extends CI_Model {
    public function __construct() {
        $this->load->database();
    }
    
    public function gets($seccion) {
        $query = $this->db->query("SELECT *
                                    FROM
                                        team
                                    WHERE
                                        seccion = '$seccion'");
        return $query->result_array();
    }
    
    public function get($idteam) {
        $query = $this->db->query("SELECT *
                                    FROM
                                        team
                                    WHERE
                                        idteam = '$idteam'");
        return $query->row_array();
    }
    
    public function update($datos, $id) {
        $idteam = array(
            'idteam' => $id
        );
        
        $this->db->update('team', $datos, $idteam);
    }
}
?>
